package com.example.springbootServiceNetwork.demos.web.Entity;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.util.Date;


@Data
@TableName("tab_user")
public class User {
    @TableId(value = "user_id", type = IdType.AUTO)
    private  String userId;
    @TableField("user_name")
    private  String userName;
    private  String sex;
    private  String sdcard;
    private  Integer age;
    @NotBlank(message = "账号或手机号不能为空！")
    private  String cellPhone;
    @NotBlank(message = "密码不能为空")
    private  String password;
    private  String image;
    @Email(message = "邮箱格式错误")
    private  String email;
    private String  hobby;
    private Integer status;//账户状态
    private String address;
    private String detailedAddress;
    private String onlineStatus;//在线状态
    private Date createTime;//创建时间
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONObject coordinate;//坐标地址信息
    private  Integer contributors;//贡献者
}
